/**
 * @author hoang.pt
 * @version $Id: MyRunnable.java 99 2010-08-28 15:47:12Z phantichhoang $
 */

package snippet.lab1;

/**
 * Runnable targer
 * @author hoang.pt
 */
public class MyRunnable implements Runnable{

	/**
	 * constructor
	 */
    public MyRunnable() {
    }
    
    /**
     * Method
     * @author hoang.pt
     */
    public void run() {
        for (int i=1; i<= 5; i++) {
            Thread t= Thread.currentThread();
            t.setName("Thread Runnable kkkkkkk");
            System.out.println("Thread is: " + t.getName());
            System.out.println("State of thread is: " + t.getState());
            System.out.println("Active running thread: " +Thread.activeCount());
        }

        System.out.println("My Runnable: " + Thread.currentThread().getName());

        //throw new UnsupportedOperationException("Not supported yet.");
    }

}
